using System;
using System.Data;
using System.Configuration;
using System.Configuration.Provider;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace XZ.Logistics.WebShop
{
    public class WebShopProviderCollection : ProviderCollection
    {
        public new WebShopProvider this[string name]
        {
            get { return (WebShopProvider)base[name]; }
        }

        public override void Add(ProviderBase provider)
        {
            if (provider == null)
                throw new ArgumentNullException("provider");

            if (!(provider is WebShopProvider))
                throw new ArgumentException("Invalid provider type", "provider");

            base.Add(provider);
        }
    }
}